#ifndef XPMDOC_DAL_XMLUTIL_H
#define  XPMDOC_DAL_XMLUTIL_H

#include <xercesc/util/XMLString.hpp>

XERCES_CPP_NAMESPACE_USE

namespace xpm {

class XStr {
public:
	XStr(const char* const toTranscode) {
		fUnicodeForm = XMLString::transcode(toTranscode);
	}

	~XStr() {
		XMLString::release(&fUnicodeForm);
	}

	const XMLCh* unicodeForm() const {
		return fUnicodeForm;
	}

private:
	XMLCh* fUnicodeForm;
};

#define X(str) XStr(str).unicodeForm()
}
#endif